package com.tuniu.agents.common.entity.favorites;

import com.tuniu.agents.common.entity.cart.CartItem;

import java.util.List;
import java.util.stream.Collectors;

/**
 * Favorites collection
 */
public class Favorites {

    /**
     * Favorites data
     */
    private List<CartItem> items;
    /**
     * Session ID
     */
    private List<String> traceIds;
    /**
     * Conversation history
     */
    private List<String> conversationHistories;

    private String conversationId;

    public List<CartItem> getItems() {
        return items;
    }

    public void setItems(List<CartItem> items) {
        this.items = items;
    }

    public List<String> getTraceIds() {
        return traceIds;
    }

    public void setTraceIds(List<String> traceIds) {
        this.traceIds = traceIds;
    }

    public List<String> getConversationHistories() {
        return conversationHistories;
    }

    public void setConversationHistories(List<String> conversationHistories) {
        this.conversationHistories = conversationHistories;
    }

    public String getConversationId() {
        return conversationId;
    }

    public void setConversationId(String conversationId) {
        this.conversationId = conversationId;
    }

    /**
     * Get selected resources as a string
     * @return Selected resources string
     */
    public  String getItemsString() {
        return items.stream().map(CartItem::toString).collect(Collectors.joining(","));
    }

    
    
    
}

